home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
How Would You Survive?
/
How Would You Survive (1995)(Grolier)[Mac-PC].iso
/
mac
/
SHARED.DIR
/
01976_Script_aPullDown
< prev
next >
Wrap
Text File
|
1995-09-13
|
6KB
|
222 lines
property pSprite,pCast,pNutral,pHilighted,pSelected,pRow1,pRow2,¼
pFunction1,pMySound,pCursor,pPullDownCast,pFunction2,phelpStatus,glossaryS,indexS
on birth me,theSprite,theCast,thePullDownCast,aSound,aFunction1,aFunction2,aCursor
set pSprite = theSprite
set pcursor = aCursor
set pCast = theCast
set pMySound = aSound
set pNutral = pCast
set pHilighted = pCast + 1
set pPullDownCast = thePullDownCast
set pRow1 = pPullDownCast + 1
set pRow2 = pPullDownCast + 2
set pFunction1 = aFunction1
set pFunction2 = aFunction2
puppetSprite pSprite, TRUE
set phelpStatus = 0
set glossaryS = 0
set indexS = 0
set the castNum of sprite pSprite = pCast
return me
end
on changePullDownButton me, newPullDownCast
set pPullDownCast = newPullDownCast
set pRow1 = pPullDownCast + 1
set pRow2 = pPullDownCast + 2
end
on setNewFunctions me, aFunction1, aFunction2
set pFunction1 = aFunction1
set pFunction2 = aFunction2
end
on TurnOnHelpSound me
set phelpStatus = 1
end
on TurnOffHelpSound me
set phelpStatus = 0
end
on setNewSound me, anewSound
set pMySound = anewSound
end
on reset me
set the castNum of sprite pSprite = pNutral
updatestage
end
on setDemoHilight me
set the castNum of sprite pSprite = pHilighted
updatestage
end
on setNewScrollFunction me, aScrollFunction
set pScrollFunction = aScrollFunction
end
on hilightPullDown me
puppetsprite pSprite, true
set glossaryS = 0
set indexS = 0
set pbeenclicked = 0
set beenclickedtwice = 0
puppettransition 0
set the cursor of sprite pSprite = [1904, 1905]
repeat while (rollover(pSprite))
if (the castNum of sprite pSprite = pNutral) then
set the castNum of sprite pSprite = pHilighted
if phelpStatus = 1 then
puppetsound pMySound
end if
set pbeenclicked = False
updatestage
if soundBusy(3) then
exit
end if
else
if (the MouseDown) then
if (not(the castNum of sprite pSprite = pPullDownCast)) then
puppetsound "FeatureButSplClk.AIFF"
updatestage
end if
set the castNum of sprite pSprite = pPullDownCast
set pbeenclicked = true
exit repeat
else
if soundBusy(3) then
exit
end if
end if
end if
end repeat
if (pbeenclicked = 1) then
repeat while rollover(psprite)
if (the mouseup) then
if (the MouseH > 65 and the MouseH <144) and the mouseV > 71 and the MouseV < 99 then
set glossaryS = 1
set indexS = 0
set the castNum of sprite pSprite = pRow1
updatestage
else
if (the MouseH > 65 and the MouseH <144) and the mouseV > 99 and the MouseV < 127 then
set indexS = 1
set glossaryS = 0
set the castNum of sprite pSprite = pRow2
updatestage
else
NoStatus
set the castNum of sprite pSprite = pPullDownCast
updatestage
end if
end if
if (the mousedown) then
set beenclickedtwice = 1
end if
else
if beenclickedtwice = 0 then
dontpassevent
else
if beenclickedtwice = 1 then
if glossaryS = 1 then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pPullDownCast
updatestage
wait .1
set the castNum of sprite pSprite = pRow1
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
do pfunction1
abort
--return true
else
if indexS = 1 then
set count = 0
repeat while count < 4
set the castNum of sprite pSprite = pPullDownCast
updatestage
wait .1
set the castNum of sprite pSprite = pRow2
updatestage
wait .1
set count = count + 1
end repeat
reset me
set the cursor of sprite pSprite = [1910, 1911]
do pfunction2
abort
--return true
else
reset me
abort
end if
end if
end if
end if
end if
end repeat
end if
if phelpStatus = 1 then
puppetsound 0
end if
if rollover(pSprite) then
if (the castNum of sprite pSprite = pHilighted) then
return TRUE
else
set the castNum of sprite pSprite = pHilighted
return TRUE
end if
else
if (the castNum of sprite pSprite = pHilighted) then
reset me
return FALSE
else
if (the castNum of sprite pSprite = pPullDownCast) then
reset me
return FALSE
else
if (the castNum of sprite pSprite = pRow1) then
reset me
return FALSE
else
if (the castNum of sprite pSprite = pRow2) then
reset me
return FALSE
else
return false
end if
end if
end if
end if
end if
end
on hideControl me
puppetSprite pSprite, FALSE
end
on showControl me
puppetSprite pSprite, TRUE
end
on Wait amount
starttimer
repeat while the timer < (amount * 60)
nothing
end repeat
end
on NoStatus me
set glossaryS = 0
set indexS = 0
end